home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL-ftn / fgltexcoordpointer.z / fgltexcoordpointer
Encoding:
Text File  |  2002-10-03  |  15.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr - define an array of texture coordinates
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr( INTEGER*4 _s_i_z_e,
  14.                                     INTEGER*4 _t_y_p_e,
  15.                                     INTEGER*4 _s_t_r_i_d_e,
  16.                                     CHARACTER*8 _p_o_i_n_t_e_r )
  17.  
  18.  
  19. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  20.      _s_i_z_e     Specifies the number of coordinates per array element. Must be
  21.               1, 2, 3 or 4. The initial value is 4.
  22.  
  23.      _t_y_p_e     Specifies the data type of each texture coordinate.  Symbolic
  24.               constants GGGGLLLL____SSSSHHHHOOOORRRRTTTT, GGGGLLLL____IIIINNNNTTTT, GGGGLLLL____FFFFLLLLOOOOAAAATTTT, or GGGGLLLL____DDDDOOOOUUUUBBBBLLLLEEEE are accepted.
  25.               The initial value is GGGGLLLL____FFFFLLLLOOOOAAAATTTT.
  26.  
  27.      _s_t_r_i_d_e   Specifies the byte offset between consecutive array elements.
  28.               If _s_t_r_i_d_e is 0, the array elements are understood to be tightly
  29.               packed. The initial value is 0.
  30.  
  31.      _p_o_i_n_t_e_r  Specifies a pointer to the first coordinate of the first element
  32.               in the array.  The initial value is 0.
  33.  
  34. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  35.      ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr specifies the location and data format of an array of
  36.      texture coordinates to use when rendering.  _s_i_z_e specifies the number of
  37.      coordinates per element, and must be 1, 2, 3, or 4.  _t_y_p_e specifies the
  38.      data type of each texture coordinate and _s_t_r_i_d_e specifies the byte stride
  39.      from one array element to the next allowing vertices and attributes to be
  40.      packed into a single array or stored in separate arrays.  (Single-array
  41.      storage may be more efficient on some implementations; see
  42.      ffffggggllllIIIInnnntttteeeerrrrlllleeeeaaaavvvveeeeddddAAAArrrrrrrraaaayyyyssss.)  When a texture coordinate array is specified,
  43.      _s_i_z_e, _t_y_p_e, _s_t_r_i_d_e, and _p_o_i_n_t_e_r are saved client-side state.
  44.  
  45.      To enable and disable the texture coordinate array, call
  46.      ffffggggllllEEEEnnnnaaaabbbblllleeeeCCCClllliiiieeeennnnttttSSSSttttaaaatttteeee and ffffggggllllDDDDiiiissssaaaabbbblllleeeeCCCClllliiiieeeennnnttttSSSSttttaaaatttteeee with the argument
  47.      GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY. If enabled, the texture coordinate array is used
  48.      when ffffggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss, ffffggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss, ffffggggllllDDDDrrrraaaawwwwRRRRaaaannnnggggeeeeEEEElllleeeemmmmeeeennnnttttssss or
  49.      ffffggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt is called.
  50.  
  51.      Use ffffggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss to construct a sequence of primitives (all of the same
  52.      type) from prespecified vertex and vertex attribute arrays.  Use
  53.      ffffggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt to specify primitives by indexing vertices and vertex
  54.      attributes and ffffggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss to construct a sequence of primitives by
  55.      indexing vertices and vertex attributes.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  71.  
  72.  
  73.  
  74. NOTES
  75.      ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr is available only if the GL version is 1.1 or greater.
  76.  
  77.      The texture coordinate array is initially disabled and it won't be
  78.      accessed when ffffggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt, ffffggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss, ffffggggllllDDDDrrrraaaawwwwRRRRaaaannnnggggeeeeEEEElllleeeemmmmeeeennnnttttssss, or
  79.      ffffggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss is called.
  80.  
  81.      Execution of ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr is not allowed between the execution of
  82.      ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ffffggggllllEEEEnnnndddd, but an error may or
  83.      may not be generated. If no error is generated, the operation is
  84.      undefined.
  85.  
  86.      ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr is typically implemented on the client side with no
  87.      protocol.
  88.  
  89.      The texture coordinate array parameters are client-side state and are
  90.      therefore not saved or restored by ffffggggllllPPPPuuuusssshhhhAAAAttttttttrrrriiiibbbb and ffffggggllllPPPPooooppppAAAAttttttttrrrriiiibbbb.  Use
  91.      ffffggggllllPPPPuuuusssshhhhCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb and ffffggggllllPPPPooooppppCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb instead.
  92.  
  93. EEEERRRRRRRROOOORRRRSSSS
  94.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_i_z_e is not 1, 2, 3, or 4.
  95.  
  96.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_y_p_e is not an accepted value.
  97.  
  98.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_t_r_i_d_e is negative.
  99.  
  100. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  101.      ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY
  102.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____SSSSIIIIZZZZEEEE
  103.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____TTTTYYYYPPPPEEEE
  104.      ffffggggllllGGGGeeeettttPPPPooooiiiinnnntttteeeerrrrvvvv with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____PPPPOOOOIIIINNNNTTTTEEEERRRR
  105.  
  106.  
  107. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  108.      On RealityEngine, RealityEngine2, and VTX systems, do not enable or
  109.      disable GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY, GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY,
  110.      GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____CCCCOOOOLLLLOOOORRRR____AAAARRRRRRRRAAAAYYYY, GGGGLLLL____CCCCOOOOLLLLOOOORRRR____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT,
  111.      GGGGLLLL____IIIINNNNDDDDEEEEXXXX____AAAARRRRRRRRAAAAYYYY,GGGGLLLL____IIIINNNNDDDDEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY,
  112.      GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____EEEEDDDDGGGGEEEE____FFFFLLLLAAAAGGGG____AAAARRRRRRRRAAAAYYYY or GGGGLLLL____EEEEDDDDGGGGEEEE____FFFFLLLLAAAAGGGG____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT
  113.      between a call to ffffggggllllNNNNeeeewwwwLLLLiiiisssstttt and the corresponding call to ffffggggllllEEEEnnnnddddLLLLiiiisssstttt.
  114.      Instead, enable or disable before the call to ffffggggllllNNNNeeeewwwwLLLLiiiisssstttt.
  115.  
  116.      On InfiniteReality systems it is particularly important to minimize the
  117.      amount of data transferred from the application to the graphics pipe,
  118.      since the host-to-pipe bandwidth limit can cause a performance
  119.      bottleneck.  One way to reduce the amount of data transferred per vertex
  120.      is to use properly-aligned byte and short data types whenever possible.
  121.      Accordingly, the EEEEXXXXTTTT____vvvveeeerrrrtttteeeexxxx____aaaarrrrrrrraaaayyyy extension on InfiniteReality systems
  122.      has been optimized for vertex information packed into the following data
  123.      structures.  (Note: _v represents vertex coordinates, _c represents color
  124.      components, _n represents normal coordinates, and _t represents texture
  125.      coordinates.  Normals must have unit length.)
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  137.  
  138.  
  139.  
  140.           struct {GLfloat v[3];}
  141.           struct {GLubyte c[4]; GLfloat v[3];}
  142.           struct {GLshort n[3]; GLfloat v[3];}
  143.           struct {GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  144.           struct {GLshort t[2]; GLfloat v[3];}
  145.           struct {GLshort t[2]; GLubyte c[4]; GLfloat v[3];}
  146.           struct {GLshort t[2]; GLshort n[3]; GLfloat v[3];}
  147.           struct {GLshort t[2]; GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  148.           struct {GLfloat t[2]; GLfloat v[3];}
  149.           struct {GLfloat t[2]; GLubyte c[4]; GLfloat v[3];}
  150.           struct {GLfloat t[2]; GLshort n[3]; GLfloat v[3];}
  151.           struct {GLfloat t[2]; GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  152.  
  153.      Application-specific fields may be added to these structures, provided
  154.      that all the fields described above retain their relative order and word
  155.      alignment.
  156.  
  157.      An additional constraint applies when ffffggggllllTTTTeeeexxxxGGGGeeeennnn is being used.  The
  158.      implementation normally generates all four texture coordinates in
  159.      parallel, and must take special action to generate just a subset of the
  160.      four coordinates.  Therefore performance is best when none of the texture
  161.      coordinates are being generated, or when all of them are being generated.
  162.      For example, when using 2D texturing (generating _s and _t coordinates) it
  163.      will be faster to enable texture coordinate generation for the _r and _q
  164.      coordinates as well as _s and _t.  Choose a texture generation mode of
  165.      GGGGLLLL____OOOOBBBBJJJJEEEECCCCTTTT____LLLLIIIINNNNEEEEAAAARRRR and use the plane equations (0,0,0,0) and (0,0,0,1) for
  166.      _r and _q, respectively.
  167.  
  168.      Using these structures on InfiniteReality systems can improve performance
  169.      considerably, compared to structures in which all values are single-
  170.      precision floating point.
  171.  
  172.  
  173. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  174.      ffffggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt, ffffggggllllCCCCoooolllloooorrrrPPPPooooiiiinnnntttteeeerrrr, ffffggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss, ffffggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss,
  175.      ffffggggllllDDDDrrrraaaawwwwRRRRaaaannnnggggeeeeEEEElllleeeemmmmeeeennnnttttssss, ffffggggllllEEEEddddggggeeeeFFFFllllaaaaggggPPPPooooiiiinnnntttteeeerrrr, ffffggggllllEEEEnnnnaaaabbbblllleeee, ffffggggllllGGGGeeeettttPPPPooooiiiinnnntttteeeerrrrvvvv,
  176.      ffffggggllllIIIInnnnddddeeeexxxxPPPPooooiiiinnnntttteeeerrrr, ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr, ffffggggllllPPPPooooppppCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb,
  177.      ffffggggllllPPPPuuuusssshhhhCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb, ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd, ffffggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrr
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.